package com.hp.modules.sys.dto;

import com.hp.common.base.YesNoEnum;
import com.hp.common.validator.Groups;
import com.hp.modules.sys.entity.SysRole;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(description = "角色")
public class SysRoleParam {
    @ApiModelProperty(value = "主键-更新时必填",position = 1)
    @NotNull(message = "主键不能为空",groups = {Groups.Update.class})
    private Long id;
    @ApiModelProperty(value = "角色名称",required=true, position = 10)
    @NotBlank(message="角色名称不能为空",groups={Groups.Save.class,Groups.Update.class})
    private String name;
    @ApiModelProperty(value = "角色标识(唯一)",required=false, position = 15)
    private String roleKey;
    @ApiModelProperty(value = "角色类型(10->管理员|ADMIN,20->流程审核员|WORKFLOW)",required=false, position = 20)
    private SysRole.RoleTypeEnum roleType;
    @ApiModelProperty(value = "数据范围(10->所有数据权限|ALL,20->部门数据权限|DEPT,30->部门及以下数据权限|DEPT_CHILD,40->仅本人数据权限|MYSELF,50->自定义数据权限|CUSTOM)",required=false, position = 25)
    private SysRole.DataScopeEnum dataScope;
    @ApiModelProperty(value = "是否启用(1->禁用|NO,2->启用|YES)",required=false, position = 30)
    private YesNoEnum isEnabled;
    @ApiModelProperty(value = "备注",required=false, position = 35)
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    public SysRole.RoleTypeEnum getRoleType() {
        return roleType;
    }

    public void setRoleType(SysRole.RoleTypeEnum roleType) {
        this.roleType = roleType;
    }

    public SysRole.DataScopeEnum getDataScope() {
        return dataScope;
    }

    public void setDataScope(SysRole.DataScopeEnum dataScope) {
        this.dataScope = dataScope;
    }

    public YesNoEnum getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(YesNoEnum isEnabled) {
        this.isEnabled = isEnabled;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
